// 请求数据
// 引入ajax
import utils from "./utils.js";

let baseUrl = "http://website.bluej.cn";
let api = {
    login: baseUrl + '/api/admin/login',
    banner: baseUrl + '/api/carouselGroup/get',
    news: baseUrl + '/api/news/getAll'
}
let token = utils.myStorage.get('token')

// 登录
export function login() {
    let data = {
        phone: 13620445274,
        password: 'lwj123'
    }
    return utils.myAjax(api.login, "POST", data)
}
// 轮播图
export function getBanner() {
    let data = {
        "carouselGroupId": "1116"
    }
    return utils.myAjax(api.banner, "GET", data, token)
}
export function getNews() {
    let data = { "limit": "4" }
    return utils.myAjax(api.news, "GET", data, token)
}